package com.goldman.distributed.common.ratelimit.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @author Bin
 * @date 2023/12/12
 */
@Data
@RefreshScope
@Component
@ConfigurationProperties(prefix = "ratelimit.config")
public class RateLimitConfigProp {
    /**
     * Y or N
     */
    private String statusOn;

    public boolean isOn() {
        return "Y".equals(statusOn);
    }

}
